package point

type WifiXApSsidPoint struct {
	index int
}

var wifixApSsid string

func NewWifiXApSsidPoint() *WifiXApSsidPoint { return &WifiXApSsidPoint{} }

func (s *WifiXApSsidPoint) Get() any {
	return wifixApSsid
}

func (m *WifiXApSsidPoint) Set(val ...any) bool {
	if len(val) < 1 {
		return false
	}

	if ssid, ok := val[0].(string); ok {
		wifixApSsid = ssid
	}

	return true
}

func (m *WifiXApSsidPoint) SetRoute(str string) PointInterface {
	m.index = int(str[len("wan")]) - '0'
	return m
}
